﻿using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace _14._1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

     
        private void Grid_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            MessageBox.Show("表格，_PreviewKeyDown事件下传");
            e.Handled = true;
        }

        private void Grid_KeyDown(object sender, KeyEventArgs e)
        {
            MessageBox.Show("表格，keydown,事件上传");
            e.Handled = true;
        }

        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            MessageBox.Show("窗口，keydown,事件上传");
        }

        private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            MessageBox.Show("窗口，PreviewKeyDown,事件下传");
        }

        private void FirstButton_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("按钮，click,点击上传");
        }

        private void TwoButton_KeyDown(object sender, KeyEventArgs e)
        {
            MessageBox.Show("Two,keydown,事件上传");
        }

        private void TwoButton_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            MessageBox.Show("Two,PreviewKeyDow,事件下传");
        }
    }
}